package com.emar.spring.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.emar.spring.dao.ProjectDao;
import com.emar.spring.dto.ParamsDTO;
import com.emar.spring.model.ProjectEntity;

@Service
public class ProjectService {

	@Autowired
	private ProjectDao projectDao;
	
	public List<ProjectEntity> getProjectList(ProjectEntity pe,int pageNumber,int pageSize){
		return projectDao.getProjectPageList(pe, null, pageNumber, pageSize);
	}
	public List<ParamsDTO> getProjectDTOList(ProjectEntity pe,String groupBy,int pageNumber,int pageSize){
		List<ParamsDTO> list = projectDao.getProjectDTOList(pe, groupBy, pageNumber, pageSize);
		return list;
	}
	public int getCorpCount(String groupBy){
		return projectDao.getCorpCount(groupBy);
	}
	public int getProjectCount(ProjectEntity pe,int pageNumber,int pageSize){
		return projectDao.getProjectCount(pe);
	}
}
